<template>
  <div id="main4"></div>
</template>

<script>
import * as echarts from 'echarts';

export default {
  data() {
    return {}
  },
  mounted() {
    const chartDom = document.getElementById('main4')
    const myChart = echarts.init(chartDom)
    let option

    option = {
      legend: {
        bottom: '15%',
        right: '10%'
      },
      series: [
        {
          type: 'pie',
          radius: ['40%', '70%'],
          label: {
            show: false
          },
          data: [
            { value: 500, name: '备件' },
            { value: 500, name: '服务项目' }
          ]
        }
      ]
    };

    option && myChart.setOption(option);
  }
}
</script>

<style scoped>
#main4 {
  width: 100%;
  height: 300px;
}
</style>
